Unify the test naming some more.
install: get_option('install-tests'),
install_dir: testexecdir,
dependencies: libgtk_dep)
-test('test-nodes', test_nodes, suite: 'css', env: test_env)
+test('nodes', test_nodes, suite: 'css', env: test_env)
test_data = [
'box.ltr.nodes',
install: get_option('install-tests'),
install_dir: testexecdir,
dependencies: libgtk_dep)
-test('css-parser', test_parser, suite: 'css', env: test_env)
+test('parser', test_parser, suite: 'css', env: test_env)
test_data = [
'animation-crash-3.12.css',
install_dir: testexecdir,
dependencies: libgtk_dep,
)
-test('test-style', test_style, suite: 'css', env: test_env)
+test('style', test_style, suite: 'css', env: test_env)
test_data = [
'adjacent-states.css',
foreach t : tests
test_exe = executable(t, '@0@.c'.format(t), dependencies : libgtk_dep)
- test('@0@ test'.format(t), test_exe, suite : 'gdk', env : test_env)
+ test(t, test_exe, suite : 'gdk', env : test_env)
endforeach
# TODO: installed tests + .test files
+test_env = environment()
+test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
+test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
+test_env.set('GSETTINGS_BACKEND', 'memory')
+test_env.set('G_ENABLE_DIAGNOSTIC', '0')
+
test_render_nodes = executable(
'test-render-nodes',
['test-render-nodes.c',
'reftest-compare.c'],
dependencies: libgtk_dep,
)
-test('test-render-nodes', test_render_nodes, suite: 'gsk')
+
+test('test-render-nodes', test_render_nodes, suite: 'gsk', env: test_env)
+
+test_data = [
+ 'blendmode.node',
+ 'blendmode.png',
+ 'blendmodes.node',
+ 'blendmodes.png',
+ 'cairo.node',
+ 'cairo.png',
+ 'colors.cairo.png',
+ 'colors.node',
+ 'colors.vulkan.png',
+ 'cross-fade.node',
+ 'cross-fade.png',
+ 'cross-fades.node',
+ 'cross-fades.png',
+ 'ducky.png',
+ 'repeat.node',
+ 'repeat.png',
+ 'transform.node',
+ 'transform.png',
+]
+
+if get_option('install-tests')
+ conf = configuration_data()
+ conf.set('libexecdir', gtk_libexecdir)
+ configure_file(input: 'test-render-nodes.test.in',
+ output: 'test-render-nodes.test',
+ configuration: conf,
+ install_dir: installed_test_datadir)
+
+ install_data(test_data, install_dir: testexecdir)
+
+endif
+
--- /dev/null
+[Test]
+Exec=/bin/sh -c "cd @libexecdir@/installed-tests/gtk-4.0/gsk && @libexecdir@/installed-tests/gtk-4.0/gsk/test-render-nodes --tap"
+Type=session
+Output=TAP
link_args : test_extra_ldflags,
dependencies : libgtk_dep)
- test('@0@ test'.format(test_name), test_exe, suite : 'gtk', env : test_env)
+ test(test_name, test_exe, suite : 'gtk', env : test_env)
endforeach
# FIXME: if objc autotestkeywords_CPPFLAGS += -DHAVE_OBJC=1 -x objective-c++
'autotestkeywords.cc',
c_args : test_cargs + ['-Idummy-headers'],
dependencies : libgtk_dep)
- test('autotestkeywords test', test_exe, suite : 'gtk', env : test_env)
+ test('c++ keywords', test_exe, suite : 'gtk', env : test_env)
endif
# FIXME: schemas from gtk+ dir?
input : 'test-@0@.in'.format(t),
configuration : configuration_data())
- test('test-@0@'.format(t), bash,
+ test(t, bash,
args : 'test-@0@'.format(t),
workdir : meson.current_build_dir(),
env : test_env,